﻿<%@ Page Language="C#" ValidateRequest="false" EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace=" System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="TarreOA.TarreOAModels" %>
<%@ Import Namespace="TarreOA.TarreOABLL" %>

<script runat="server">

    //private static string ndcP = "";
    private string catalogName;
    //private int c_id;
    private string[] opUser;

    protected void Page_Load(object sender, EventArgs e)
    {
        if(Session["user"] == null)
        {
            Response.Redirect("~/Login.aspx");
        }
        else
        {
            if(!Page.IsPostBack)
            {
                this.btnDelete.Attributes.Add("onclick", "javascript:if(checkSelectFileOrFolder() == true){return confirm('您确认删除选中的文件或文件夹吗？');}else{return false;}");
                if(Request["C_N"] != null && Request.QueryString.Get("C_ID") != null)
                {
                    catalogName = Request["C_N"];
                    if(FindConfigurationPath.instance().NetDiskRoots[catalogName] == null)
                    {
                        FindConfigurationPath.instance().AddNetDiskRoots(catalogName, catalogName);
                    } 
                    int c_id = int.Parse(Request.QueryString.Get("C_ID"));
                    NetDisktbServices ndService = new NetDisktbServices();
                    NetDisktb nd = ndService.findByNdId(c_id);
                    this.btnNewFloder.Attributes.Add("c_id", c_id.ToString());
                    this.BtnUploadFile.Attributes.Add("c_id", c_id.ToString());
                    this.LbtSerach.Attributes.Add("c_id", c_id.ToString());
                    if(nd != null)
                    {
                        opUser = nd.NetDiskCatalogOpUsers.Split(',');
                    }
                    ViewState["c_id"] = c_id.ToString();
                }
                string cp = FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString();
                this.findCatalogInfo(cp);
                this.findAllPath();
                ViewState["catalogName"] = catalogName;
                ViewState["opUser"] = opUser;
            }
        }
    }

    protected void findAllPath()
    {
        this.DropDownList1.Items.Clear();
        this.DropDownList2.Items.Clear();
        NetDiskCatalogFolderAndFileService ndcfafService = new NetDiskCatalogFolderAndFileService();
        string cp = FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString();
        List<string> list = ndcfafService.findCurrentCatalogAllFolder(cp);
        ListItem rootItem = new ListItem("\\", "");
        this.DropDownList1.Items.Add(rootItem);
        this.DropDownList2.Items.Add(rootItem);
        if(list != null)
        {
            foreach(string pathAndName in list)
            {
                string[] pan = pathAndName.Split(',');
                ListItem listItem = new ListItem(pan[1], pan[0].Replace(cp, ""));
                this.DropDownList1.Items.Add(listItem);
                this.DropDownList2.Items.Add(listItem);
            }
        }
    }

    /// <summary>
    /// 查找指定目录下的所有文件和文件夹
    /// <param name="cP"></param>
    /// </summary>
    protected void findCatalogInfo(string cP)
    {
        if(Directory.Exists(cP))
        {
            NetDiskCatalogFolderAndFileService ndcfafService = new NetDiskCatalogFolderAndFileService();
            List<NetDiskCatalogFolderAndFile> list = ndcfafService.findByThePath(cP);
            DataTable dt = new DataTable();
            dt.Columns.Add("FolderOrFileName", typeof(string));
            dt.Columns.Add("FolderOrFilePath", typeof(string));
            dt.Columns.Add("FolderOrFileCreateTime", typeof(string));
            dt.Columns.Add("FolderOrFile", typeof(string));
            dt.Columns.Add("FolderOrFileSize", typeof(string));
            if(!cP.Equals(FindConfigurationPath.instance().NetDiskRoots[catalogName]))
            {
                DataRow firDr = dt.NewRow();
                firDr["FolderOrFileName"] = "返回上一级目录";
                string path = cP.Substring(0, cP.LastIndexOf("\\")).Replace(FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString(), "");
                firDr["FolderOrFilePath"] = path;
                firDr["FolderOrFile"] = "";
                dt.Rows.Add(firDr);
            }
            if(list != null && list.Count > 0)
            {
                foreach(NetDiskCatalogFolderAndFile ndcfaf in list)
                {
                    DataRow dr = dt.NewRow();
                    dr["FolderOrFileName"] = ndcfaf.FolderOrFileName;
                    dr["FolderOrFilePath"] = ndcfaf.FolderOrFilePath.Replace(FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString(), "");
                    dr["FolderOrFileCreateTime"] = ndcfaf.FoderOrFileCreateTime;
                    dr["FolderOrFile"] = ndcfaf.FolderOrFile;
                    dr["FolderOrFileSize"] = ndcfaf.FolderOrFileSize;
                    dt.Rows.Add(dr);
                }
            }
            this.DataList1.DataSource = dt.DefaultView;
            this.DataList1.DataBind();
        }
        else
        {
            this.DataList1.DataSource = null;
            this.DataList1.DataBind();
        }
    }

    private int fileCount;
    private int catalogCount;
    protected void DataList1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if(e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
        {
            string curPath = ((HtmlInputHidden) e.Item.FindControl("HidcP")).Value;
            string curType = ((Label) e.Item.FindControl("LblType")).Text.Trim();
            if(this.btnDelete.Attributes["cP"] == null)
            {
                this.btnDelete.Attributes.Add("cP", curPath);
            }
            else
            {
                this.btnDelete.Attributes["cP"] = curPath;
            }
            ((ImageButton) e.Item.FindControl("imgBtnUpload")).Attributes.Add("cP", curPath);
            ((CheckBox) e.Item.FindControl("chkCur")).InputAttributes.Add("value", curPath);
            ((LinkButton) e.Item.FindControl("LinkButton1")).Attributes.Add("cP", curPath);
            ((LinkButton) e.Item.FindControl("LinkButton1")).Attributes.Add("cT", curType);
            ((ImageButton) e.Item.FindControl("imBtnProps")).Attributes.Add("cP", curPath);
            if(((LinkButton) e.Item.FindControl("LinkButton1")).Text.Trim().Equals("返回上一级目录"))
            {
                ((CheckBox) e.Item.FindControl("chkCur")).Visible = false;
                ((ImageButton) e.Item.FindControl("imBtnProps")).Visible = false;
                ((ImageButton) e.Item.FindControl("imgBtnDownLoad")).Visible = false;
                ((ImageButton) e.Item.FindControl("imgBtnUpload")).Visible = false;
                ((Image)e.Item.FindControl("Image1")).ImageUrl = "~/images/folder.gif";
            }
            if(((Label) e.Item.FindControl("LblType")).Text.Trim().Equals("文件夹"))
            {
                catalogCount++;
                ((ImageButton) e.Item.FindControl("imgBtnDownLoad")).Visible = false;
                ((Image) e.Item.FindControl("Image1")).ImageUrl = "~/images/folder.gif";
            }
            if(((Label) e.Item.FindControl("LblType")).Text.Trim().Equals("文件"))
            {
                fileCount++;
                ((ImageButton) e.Item.FindControl("imgBtnUpload")).Visible = false;
                ((Image) e.Item.FindControl("Image1")).Visible = false;
                ((ImageButton) e.Item.FindControl("imgBtnDownLoad")).Attributes.Add("cP", curPath);
            }
        }
        if(e.Item.ItemType == ListItemType.Footer)
        {
            ((Label) e.Item.FindControl("Label1")).Text = "共" + fileCount.ToString() + "个文件," + catalogCount + "个目录";
        }
    }

    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        string cT = ((LinkButton) sender).Attributes["cT"];
        if(cT.Equals("文件"))
        {
            string filePath = FindConfigurationPath.instance().NetDiskRoots[catalogName] + ((LinkButton) sender).Attributes["cP"];
            string fileName = filePath.Substring(filePath.LastIndexOf("\\") + 1);
            FileInfo fi = new FileInfo(filePath);
            if(fi.Exists)
            {
                Response.Clear();
                Response.AddHeader("Content-Disposition", "attachment;fileName=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
                Response.ContentType = "application/octet-stream";
                Response.Filter.Close();
                Response.WriteFile(fi.FullName);
                Response.End();
            }
        }
        else
        {
            string filePath = FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString() + ((LinkButton) sender).Attributes["cP"];
            this.findCatalogInfo(filePath);
            this.findAllPath();
        }
        ViewState["catalogName"] = catalogName;
        ViewState["opUser"] = opUser;
    }

    protected void btnNewFloder_ServerClick(object sender, EventArgs e)
    {
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        bool state = false;
        User curLoginUser = (User) Session["user"];
        for(int i = 0; i < opUser.Length; i++)
        {
            if(curLoginUser.UserId == int.Parse(opUser[i]) || curLoginUser.PopedomGroup.PopedomGroupId == 1)
            {
                state = true;
            }
        }
        if(state)
        {
            string c_id = ((ImageButton) sender).Attributes["c_id"];
            Server.Transfer("CreateDiskCatalogFolder.aspx?c_N=" + catalogName + "&c_id=" + c_id);
        }
        else
        {
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "", "alert('您无权限操作，请与管理员联系！');", true);
        }
        ViewState["catalogName"] = catalogName;
        ViewState["opUser"] = opUser;
    }

    protected void imgBtnDownLoad_Click(object sender, ImageClickEventArgs e)
    {
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        string filePath = FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString() + ((ImageButton) sender).Attributes["cP"];
        string fileName = filePath.Substring(filePath.LastIndexOf("\\") + 1);
        FileInfo fi = new FileInfo(filePath);
        if(fi.Exists)
        {
            Response.Clear();
            Response.AddHeader("Content-Disposition", "attachment;fileName=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
            Response.ContentType = "application/octet-stream";
            Response.Filter.Close();
            Response.WriteFile(fi.FullName);
            Response.End();
        }
        ViewState["catalogName"] = catalogName;
        ViewState["opUser"] = opUser;
    }

    protected void btnDelete_ServerClick(object sender, EventArgs e)
    {
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        bool state = false;
        User curLoginUser = (User) Session["user"];
        for(int i = 0; i < opUser.Length; i++)
        {
            if(curLoginUser.UserId == int.Parse(opUser[i]) || curLoginUser.PopedomGroup.PopedomGroupId == 1)
            {
                state = true;
            }
        }
        if(state == false)
        {
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "", "alert('您无权限操作，请与管理员联系！');", true);
        }
        else
        {
            List<string> reqList = new List<string>();
            //string cP = ((Button)sender).Attributes["cP"]; 
            foreach(RepeaterItem dit in this.DataList1.Items)
            {
                if(((CheckBox) dit.FindControl("chkCur")).Checked == true)
                {
                    reqList.Add(((CheckBox) dit.FindControl("chkCur")).InputAttributes["value"]);
                }
            }
            if(reqList.Count > 0)
            {
                foreach(string path in reqList)
                {
                    DirectoryInfo dirInfo = new DirectoryInfo(FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString() + path);
                    if(dirInfo.Exists)
                    {
                        dirInfo.Delete(true);
                    }
                    FileInfo fileInfo = new FileInfo(FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString() + path);
                    if(fileInfo.Exists)
                    {
                        fileInfo.Delete();
                    }
                }
                if(this.btnDelete.Attributes["cP"] != null && !"".Equals(this.btnDelete.Attributes["cP"]))
                {
                    string p = this.btnDelete.Attributes["cP"].Substring(0, btnDelete.Attributes["cP"].LastIndexOf("\\"));
                    this.findCatalogInfo(FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString() + p);
                }
                else
                {
                    this.findCatalogInfo(FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString());
                }
                this.findAllPath();
            }
        }
        ViewState["catalogName"] = catalogName;
        ViewState["opUser"] = opUser;
    }

    protected void btnMove_ServerClick(object sender, EventArgs e)
    {
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        bool state = false;
        User curLoginUser = (User) Session["user"];
        for(int i = 0; i < opUser.Length; i++)
        {
            if(curLoginUser.UserId == int.Parse(opUser[i]) || curLoginUser.PopedomGroup.PopedomGroupId == 1)
            {
                state = true;
            }
        }
        if(state == false)
        {
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "", "alert('您无权限操作，请与管理员联系！');", true);
        }
        else
        {
            string target = FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString() +
                Request.Params.GetValues(this.DropDownList2.ClientID)[0];
            List<string> reqList = new List<string>();
            //string cP = ((Button)sender).Attributes["cP"]; 
            foreach(RepeaterItem dit in this.DataList1.Items)
            {
                if(((CheckBox) dit.FindControl("chkCur")).Checked == true)
                {
                    reqList.Add(((CheckBox) dit.FindControl("chkCur")).InputAttributes["value"]);
                }
            }
            foreach(string source in reqList)
            {
                try
                {
                    DirectoryInfo dirInfo = new DirectoryInfo(FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString() + source);
                    if(dirInfo.Exists)
                    {
                        if(target.Equals(source))
                        {
                            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "", "alert('不允许将此目录移动到自己的子目录中！');", true);
                            return;
                        }
                        else
                        {
                            if(!source.Equals(target + "\\" + dirInfo.FullName.Substring(dirInfo.FullName.LastIndexOf("\\") + 1)))
                            {
                                dirInfo.MoveTo(target + "\\" + dirInfo.FullName.Substring(dirInfo.FullName.LastIndexOf("\\") + 1));
                            }
                        }
                    }
                    FileInfo fileInfo = new FileInfo(FindConfigurationPath.instance().NetDiskRoots[catalogName].ToString() + source);
                    if(fileInfo.Exists)
                    {
                        fileInfo.MoveTo(target + "\\" + fileInfo.FullName.Substring(fileInfo.FullName.LastIndexOf("\\") + 1));
                    }
                }
                catch(IOException)
                {
                    ScriptManager.RegisterClientScriptBlock(Page, GetType(), "", "alert('操作被拒绝，请检查路径是否合理！');", true);
                    return;
                }
            }
            this.findCatalogInfo(target);
            this.findAllPath();
        }
        ViewState["catalogName"] = catalogName;
        ViewState["opUser"] = opUser;
    }

    protected void BtnUploadFile_ServerClick(object sender, EventArgs e)
    {
        //Session["cP"] = ndcP;
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        bool state = false;
        User curLoginUser = (User) Session["user"];
        for(int i = 0; i < opUser.Length; i++)
        {
            if(curLoginUser.UserId == int.Parse(opUser[i]) || curLoginUser.PopedomGroup.PopedomGroupId == 1)
            {
                state = true;
            }
        }
        if(state == false)
        {
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "", "alert('您无权限操作，请与管理员联系！');", true);
        }
        else
        {
            string c_id = ((HtmlInputSubmit) sender).Attributes["c_id"];
            string curP = Request.Params.GetValues(this.DropDownList1.ClientID)[0];
            Server.Transfer("UploadFile.aspx?c_P=" + curP + "&c_N=" + catalogName + "&c_id=" + c_id);
        }
        ViewState["catalogName"] = catalogName;
        ViewState["opUser"] = opUser;
    }

    protected void imBtnProps_Click(object sender, ImageClickEventArgs e)
    {
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        string c_P = ((ImageButton) sender).Attributes["cP"];
        Response.Redirect("FolderProps.aspx?c_P=" + c_P + "&c_N=" + catalogName);
    }

    protected void LbtSerach_Click(object sender, EventArgs e)
    {
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        string c_id = ((LinkButton) sender).Attributes["c_id"];
        Response.Redirect("FileSerach.aspx?c_N=" + catalogName + "&c_id=" + c_id);
    }

    protected void imgBtnUpload_Click(object sender, ImageClickEventArgs e)
    {
        if(ViewState["catalogName"] != null && ViewState["opUser"] != null)
        {
            catalogName = (string) ViewState["catalogName"];
            opUser = (string[]) ViewState["opUser"];
        }
        string c_id = "";
        if(ViewState["c_id"] != null)
        {
            c_id = (string) ViewState["c_id"];
        }
        bool state = false;
        User curLoginUser = (User) Session["user"];
        for(int i = 0; i < opUser.Length; i++)
        {
            if(curLoginUser.UserId == int.Parse(opUser[i]) || curLoginUser.PopedomGroup.PopedomGroupId == 1)
            {
                state = true;
            }
        }
        if(state == false)
        {
            ScriptManager.RegisterClientScriptBlock(Page, GetType(), "", "alert('您无权限操作，请与管理员联系！');", true);
            ViewState["catalogName"] = catalogName;
            ViewState["opUser"] = opUser;
        }
        else
        {
            string curPath = ((ImageButton) sender).Attributes["cP"];
            Response.Redirect("UploadFile.aspx?c_P=" + curPath + "&c_N=" + catalogName + "&c_id=" + c_id);
        }
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>

    <script type="text/javascript" src="../js/NetDisk.js"></script>

                <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
                <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>

                <style type="text/css">
                <!--
                html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
                scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
                -->
                </style>

</head>
<body>
    <form id="form1" runat="server">
            <div class="sub_right_top">
  <div class="hdm_header" >
    <div class="tb1_on"><h2 class="h2_icon">网络硬盘</h2></div>

    <div class="clear"></div>
  </div>
  <div class="hdm_footer">
    <div style="height:13px; overflow:hidden;"></div>
      <table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0" style="border-collapse:collapse;">
        <tr bgcolor="#b1d5ef">
          <td><div class="disk_top_neir">
        <div class="disk_newfiles">当前文件夹：</div>

        <div class="disk_list">
            <asp:DropDownList ID="DropDownList1"
                            runat="server" Width="240px">
                        </asp:DropDownList>
        </div>
        <div class="disk_anniu_style">

        <asp:ImageButton ID="btnNewFloder" runat="server" name="btnNewFloder" OnClientClick="return btnNewFloder_onclick()" 
                                     OnClick="btnNewFloder_ServerClick" ImageUrl="~/images/new_files.gif" />
        </div>
        <div class="disk_sousuo_file"><img src="../images/report_search.gif" alt=""/></div>
        <div class="disk_sousuo_ming">
            <asp:LinkButton ID="LbtSerach" runat="server"
                                OnClick="LbtSerach_Click">搜索文件</asp:LinkButton>
        </div>
        <div class="clear"></div>
      </div></td>
        </tr>
      </table>
      <div style="height:10px; overflow:hidden;"></div>

      <asp:Repeater ID="DataList1" runat="server" OnItemDataBound="DataList1_ItemDataBound">
                            <HeaderTemplate>
                                     <table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0" style="border-collapse:collapse;">
                                    <tr bgcolor="#b1d5ef">
                                      <td width="40">
                                        选择
                                      </td>
                                      <td align="center">名称</td>
                                      <td width="80" align="center">大小</td>
                                      <td width="60" align="center">类型</td>
                                      <td width="140" align="center">最后修改时间</td>
                                      <td width="60" align="center">操作</td>
                                    </tr>

                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr bgcolor="white">
                                    <td align="center" nowrap="nowrap" width="30px">
                                            <asp:CheckBox ID="ChkCur" runat="server" Text="" /></td>
                                    <td nowrap="nowrap" align="left">
                                        <asp:Image ID="Image1" runat="server" ImageAlign="AbsMiddle" />
                                        <asp:LinkButton ID="LinkButton1" runat="server"
                                            Font-Underline="False" Text='<%# Eval("FolderOrFileName") %>'
                                            OnClick="LinkButton1_Click"></asp:LinkButton></td>
                                    <td align="center" nowrap="nowrap" width="80px">
                                            <%# Eval("FolderOrFileSize") %>
                                    </td>
                                    <td align="center" nowrap="nowrap" width="80px">
                                            <asp:Label ID="LblType" runat="server" Text='<%# Eval("FolderOrFile") %>' Width="42px"></asp:Label></td>
                                    <td align="center" nowrap="nowrap" width="120px">
                                            <%# Eval("FolderOrFileCreateTime") %>
                                    </td>
                                    <td align="center" nowrap="nowrap" width="80px">
                                        <input id="HidcP" type="hidden" runat="server" value='<%# Eval("FolderOrFilePath") %>' />
                                        <font style="font-size: 12px">
                                            <asp:ImageButton ID="imBtnProps" runat="server"  ImageAlign="AbsMiddle"
                                                ImageUrl="~/images/props.gif" ToolTip="查看属性"  OnClick="imBtnProps_Click" />
                                            <asp:ImageButton ID="imgBtnDownLoad" runat="server" Height="17px" ImageAlign="AbsMiddle"
                                                ImageUrl="~/images/down.gif" ToolTip="下载"  OnClick="imgBtnDownLoad_Click" />
                                            <asp:ImageButton ID="imgBtnUpload" runat="server"  ImageAlign="AbsMiddle"
                                                ImageUrl="~/images/upload.gif" ToolTip="上传文件" OnClick="imgBtnUpload_Click" /></font></td>
                                </tr>
                            </ItemTemplate>
                            
                            <FooterTemplate>
                                    <tr>
                                        <td align="center" nowrap="nowrap" style="height: 30px;">
                                            <font>
                                                <input id="Checkbox2" name="allChk" onclick="allMsgCheck()" type="checkbox" /></font>
                                            
                                        </td>
                                        <td colspan="5">
                                       <span style="font-size: 9pt"><b>全选</b></span>
                                            <font style="font-size: 12px">
                                                <asp:Label ID="Label1" runat="server" Text="" ></asp:Label>&nbsp; </font>
                                        </td> 
                                    </tr>
                                    </table>
                            </FooterTemplate>
                        </asp:Repeater>
                        <table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0" style="border-collapse:collapse;">
                            <tr bgcolor="#b1d5ef">
                                <td>
                                    <input id="btnDelete" runat="server" class="BigButton" name="btnDelete" onclick="return checkSelectFileOrFolder()"
                                onserverclick="btnDelete_ServerClick" type="submit" value="删除" />
                            <input id="BtnUploadFile" class="BigButton" name="btnNewFile" type="submit" value="上传文件"
                                runat="server" onserverclick="BtnUploadFile_ServerClick" />
                            <input id="btnMove" runat="server" class="BigButton" name="btnMove" onclick="return checkSelectFileOrFolder();"
                                onserverclick="btnMove_ServerClick" type="submit" value="移动到" />&nbsp;&nbsp;<asp:DropDownList
                                    ID="DropDownList2" runat="server" Width="240px">
                                </asp:DropDownList>
                                &nbsp;

                                <asp:Button ID="Button1" runat="server" PostBackUrl="~/NetDisk/NetDiskIndex.aspx"  CssClass="fanhui_anniu"/>
                                &nbsp;
                                <input type="button" id="back" value="后退" onclick="window.history.go(-1)" />
                                </td>
                            </tr>
                        </table>
      <div style="height:15px; overflow:hidden;"></div>    
  </div>
</div>

    </form>
</body>
</html>
